package auftrag;

import java.util.HashMap;

public class Operation {
	private HashMap<Resource, Integer> mPossibleResources = new HashMap<Resource, Integer>();
	private Variante mParent;
	private String mName;
	private Operation mPreviousOperation;
	
	public Operation(Variante v, Operation prev, String s){
		mParent = v;
		mName = s;
		mPreviousOperation = prev;
	}
	
	public HashMap<Resource, Integer> getResources(){
		return mPossibleResources;
	}
	
	public void addPossibleResource(Resource r, int d){
		mPossibleResources.put(r,  d);
	}
	
	public Variante getParent(){
		return mParent;
	}
	
	@Override
	public String toString(){
		return mName;
	}
	
	public Operation getPreviousOperation(){
		return mPreviousOperation;
	}
}
